/*
 * @Author: 李超越 1509572300@qq.com
 * @Date: 2024-07-30 13:43:53
 * @LastEditors: 李超越 1509572300@qq.com
 * @LastEditTime: 2024-07-31 14:14:04
 * @FilePath: /my_git/lesson26_shm/ShmClient.cc
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
 */
#include "Comm.hpp"
#include "Fifo.hpp"

int main()
{
    Sync syn;
    syn.OpenWrite();
    key_t key=GetShyKeyorDie();
    int shmid=GetShm(key,defaultsize);
    char* addr=(char*)ShmAttach(shmid);
    for(char c='A';c<='Z';c++)
    {
        addr[c-'A']=c;
        sleep(1);
    }
    ShmDetach(addr);
    return 0;
}